<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
        * {
            margin: 0px;
            padding: 0px;
        }

        .span1 {
            background-color: antiquewhite;
            font-size: 50px;
            vertical-align: middle
        }

        .span2 {
            background-color: red;
            font-size: 30px;
            vertical-align: text-top
        }

        .span3 {
            background-color: blue;
            font-size: 30px;

        }

        .span4 {
            background-color: gold;
            font-size: 30px;
            vertical-align: baseline;
        }

        .span5 {
            background-color: greenyellow;
            font-size: 30px;
            vertical-align: bottom;
        }
    </style>
</head>
<div>
    <div style="border: 1px solid black;">
        <span class="span1">Hello World </span>
        <!-- <span class="span2">top对齐</span> -->
        <span class="span3">middle对齐</span>
        <!-- <span class="span4">baseline对齐</span>
            <span class="span5">bottom对齐</span> -->
        <div>
            <img src="" alt="">
        </div>
    </div>
</div>

</html>